CentOS 7
Sponsored Link

OpenStack Juno : Configure Glance
2015/01/08
 
Install and Configure OpenStack Image Service (Glance).
[1] Install Glance.
# install from RDO, EPEL

[root@dlp ~]#
yum --enablerepo=openstack-juno,epel -y install openstack-glance
[2] Add a User and Database on MariaDB for Glance.
[root@dlp ~]#
mysql -u root -p

Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 16
Server version: 5.5.40-MariaDB-wsrep MariaDB Server, wsrep_25.11.r4026

Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>
create database glance;

Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on glance.* to glance@'localhost' identified by 'password';

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on glance.* to glance@'%' identified by 'password';

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
flush privileges;

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
exit

Bye
[3] Configure Glance.
[root@dlp ~]#
vi /etc/glance/glance-registry.conf
# line 143: uncomment and change the info ( the one for MariaDB )

connection=
mysql://glance:password@10.0.0.30/glance
# line 224: change like follows ( the one added in Keystone )

[keystone_authtoken]
identity_uri=http://
10.0.0.30:35357

admin_tenant_name=
service

admin_user=
glance

admin_password=
servicepassword
# line 238: add

flavor=keystone
[root@dlp ~]#
vi /etc/glance/glance-api.conf
# line 223: change ( RabbitMQ User and Password )

rabbit_userid=
guest

rabbit_password=
password
# line 303: uncomment and change the info ( the one for MariaDB )

connection=
mysql://glance:password@10.0.0.30/glance
# line 384: change like follows ( the one added in Keystone )

[keystone_authtoken]
identity_uri=http://
10.0.0.30:35357

admin_tenant_name=
service

admin_user=
glance

admin_password=
servicepassword

revocation_cache_time=10
# line 399: add

flavor=keystone
[root@dlp ~]#
glance-manage db_sync

[root@dlp ~]#
for service in api registry; do
systemctl start openstack-glance-$service
systemctl enable openstack-glance-$service
done
* remove the log file if keystone will not start.

[root@dlp ~]#
rm /var/log/glance/*.log

 
Tweet